private void Form1_Load(object sender, EventArgs e)
{
SetPictureBoxImage(pictureBox2, dst.ToBitmap());
}
VideoCapture cap; //对象名为_capture
public bool bTakePicture = true;
// static VideoCapture cap = new VideoCapture();
public string PicSavePath = @"E:\1.jpg";
Mat capMat = new Mat(); //摄像头画面capMat
FrameSource frame = Cv2.CreateFrameSource_Camera(0);
//输入模板(即输入图像图片所在地址),注意这里的模板图像大小不能超过目标图像
Mat dst = new Mat(@"E:\1.jpg", ImreadModes.AnyColor);
//创建result的模板,就是MatchTemplate里的第三个参数
Mat mat = new Mat();
OpenCvSharp.Point minLocation, maxLocation;
private void button2_Click(object sender, EventArgs e)
{
bTakePicture = false;
Application.Exit();
}
评论